<script type="text/javascript" src="<?= base_url('webroot/libreria/reloj.js') ?>"></script>

<?php
//echo "<pre>";
//print_r($herramientas);
//echo "</pre>";
?>

<div class="span-24 last">
    <div class="span-6" >
        <?= $menu ?>
    </div>
    <div class="span-18 last">
        <div class="span-14 "><label class="titulo">Crear Proforma</label></div>
        <div class="span-3 last"><script>inicio()</script></div>

        <div class="span-18 last">
            <div class="span-14">
                <div class="buscador" style=" width: 500px;height: 150px;overflow-y: auto">
                    <table>
                        <thead>
                            <tr>
                                <th>Descripcion</th>
                                <th>P. Unitario</th>
                                <th>Estado</th>
                            </tr>
                        </thead>
                        <tbody class="detalle">

                        </tbody>
                    </table>
                </div>
            </div>
            <div class="span-3 last">
                <input type="text" style="width: 150px;" id="buscar"/>
            </div>
        </div>
        <div class="span-18 last">
            <table>
                <thead>
                    <tr>
                        <th>Codigo</th>
                        <th>Descripcion</th>
                        <th>Cantidad</th>
                        <th>P. Unitario</th>
                        <th>P. Total</th>
                        <th>Acci&oacute;n</th>
                    </tr>
                </thead>
                <tbody class="piezas">
                    
                </tbody>
                <tr>
                    <td colspan="5" >Precio Total: S/.<input type="text" style="width: 50px;" class="precioFinal"/></td>
                </tr>
            </table>
            <div class="span-18 last"><button onclick="guardar()">Guardar</button>
                <a href="<?= site_url('pedidoController') ?>"><button>Cancelar</button></a></div>
        </div>
    </div>
</div>
<script type="text/javascript">
    $("#buscar").keypress(function() {
    cadena=$("#buscar").val();
    $.ajax({
    url: "buscar",
    type: "POST",
    async: true,
    data: {cadena:cadena},
    }).done(function(data) {
    $(".buscador").empty().append(data);
    });
    });
</script>